<?php
class PaymentMgr
	{
		private $dbc;		
		
		 public function __construct($dbc = null)
	     {
	            if (isset($dbc))
	            {
	                $this->dbc = $dbc;	         
	            }
	     }
	     
	    public function addTransaction($oid, $trans_type, $amt, $rc, $rrc, $tid, $r)
	     {
	     	$q="INSERT INTO orderpayment VALUES (NULL, $oid, $trans_type, $amt, $rc, $rrc, $tid, $r, NOW())";
	     	$r = mysqli_query($this->dbc, $q);
	     	// For debugging purposes:
			//if (!$r) echo mysqli_error($dbc);
	     }
	}   